var api = require('../../utils/api.js')
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    data:Object
  },

  /**
   * 组件的初始数据
   */
  data: {
    path:api.path,
    current:0,
    autoplay:true
  },

  /**
   * 组件的方法列表
   */
  methods: {
    bindplay(){
      this.setData({
        autoplay:false
      })
      console.log(this.data.autoplay)
    },
    bindpause(){
      this.setData({
        autoplay:true
      })
    },
    bindchangeBanner(e) {
      if (e.detail.source == "touch") {
        this.setData({
          current: e.detail.current
        })
      }else if(e.detail.source == "autoplay"){
        this.setData({
          current: e.detail.current
        })
      }
    },
  }
})